<template>
  <view>
    <router-view />
    
  </view>
</template>

<script setup>
import { onLaunch, onShow, onHide, onUnload } from "@dcloudio/uni-app";
import { routerGuard } from "@/utils/permission.js";

let timer = null;




onShow(() => {
  console.log("App Show");
  routerGuard().catch((err) => console.error("前台检查失败:", err));
});

onHide(() => {
  console.log("App Hide");
});

onUnload(() => {
  clearInterval(timer);
  timer = null;
});
</script>

<style>
/*每个页面公共css */
@import "colorui/main.css";
@import "colorui/icon.css";
@import "@/static/iconfont.css";
</style>
